package com.soft.entity;

import java.time.LocalDateTime;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;

/**
 * 实体：附件（表 attachment）
 * 描述：采用多态关联（relatedType+relatedId）挂载于工作日志/日程等对象上；记录文件元数据与上传者。
 */
@TableName("attachment")
public class Attachment {
     // 主键，自增
    @TableId(type = IdType.AUTO)
    private Integer attachmentId;
    
     // 关联类型：schedule/worklog
    private String relatedType; // schedule/worklog
    
     // 关联主键 ID
    private Integer relatedId;
    
     // 文件名（展示）
    private String fileName;
    
     // 文件存储路径
    private String filePath;
    
     // 文件大小（字节）
    private Long fileSize;
    
     // 文件类型（MIME 或后缀）
    private String fileType;
    
     // 上传者用户 ID
    private Integer uploaderId;
    
     // 上传时间
    private LocalDateTime uploadTime;

    public Integer getAttachmentId() {
        return attachmentId;
    }

    public void setAttachmentId(Integer attachmentId) {
        this.attachmentId = attachmentId;
    }

    public String getRelatedType() {
        return relatedType;
    }

    public void setRelatedType(String relatedType) {
        this.relatedType = relatedType;
    }

    public Integer getRelatedId() {
        return relatedId;
    }

    public void setRelatedId(Integer relatedId) {
        this.relatedId = relatedId;
    }

    public String getFileName() {
        return fileName;
    }

    public void setFileName(String fileName) {
        this.fileName = fileName;
    }

    public String getFilePath() {
        return filePath;
    }

    public void setFilePath(String filePath) {
        this.filePath = filePath;
    }

    public Long getFileSize() {
        return fileSize;
    }

    public void setFileSize(Long fileSize) {
        this.fileSize = fileSize;
    }

    public String getFileType() {
        return fileType;
    }

    public void setFileType(String fileType) {
        this.fileType = fileType;
    }

    public Integer getUploaderId() {
        return uploaderId;
    }

    public void setUploaderId(Integer uploaderId) {
        this.uploaderId = uploaderId;
    }

    public LocalDateTime getUploadTime() {
        return uploadTime;
    }

    public void setUploadTime(LocalDateTime uploadTime) {
        this.uploadTime = uploadTime;
    }
}
